<template>
    <el-form style="margin-top: 30px;" label-position="left" label-width="90px">
        <el-row justify="center">
            <el-col :lg="12" :xs="24" :md="24" :sm="15">
                <el-row>
                    <el-col :span="24">
                        <el-divider content-position="left">基本信息</el-divider>
                    </el-col>
                    <el-col :lg="11" :xs="24" :md="11" :sm="11">
                        <el-form-item label="学校名称:" prop="school_id">

                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :lg="11" :xs="24" :md="11" :sm="11">
                        <el-form-item label="项目主管:" prop="manager">
                            <el-checkbox-group v-model="projectForm.manager">
                                <el-checkbox style="background-color: #fff;" v-for="(item, index) in manageOptions" border
                                    :label="item.id" :key="index">
                                    {{ item.realname }}
                                </el-checkbox>
                            </el-checkbox-group>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :lg="11" :xs="24" :md="11" :sm="11">
                        <el-form-item label="项目成员:" prop="school_id">
                            <el-checkbox-group v-model="projectForm.projectMember">
                                <el-checkbox style="background-color: #fff;" v-for="(item, index) in memberOptions" border
                                    :label="item.id" :key="index">
                                    {{ item.realname }}
                                </el-checkbox>
                            </el-checkbox-group>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :lg="11" :xs="24" :md="11" :sm="11">
                        <el-form-item label="微信通知:" prop="notification">
                            <el-checkbox-group v-model="projectForm.notification">
                                <el-checkbox style="background-color: #fff;" v-for="(item, index) in noticeOptions" border
                                    :label="item.id" :key="index">
                                    {{ item.realname }}
                                </el-checkbox>
                            </el-checkbox-group>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :lg="11" :xs="24" :md="11" :sm="11">
                        <el-form-item label="项目名称:" prop="name">
                            <el-input v-model="projectForm.name" ref="name" placeholder="请输入项目名称"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :lg="11" :xs="24" :md="11" :sm="11">
                        <el-form-item label="专业录入:" prop="school_id">
                            <el-select placeholder="请选择报考院校" v-model="projectForm.school_id">
                                <el-option label="中国地质大学" value="1"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row style="justify-content: space-between;">
                    <el-col :span="24">
                        <el-divider content-position="left">学校联系信息</el-divider>
                    </el-col>
                    <el-col :lg="11" :xs="24" :md="11" :sm="11">
                        <el-form-item label="咨询电话1:" prop="phone">
                            <el-input v-model="projectForm.phone" placeholder="请输入咨询电话1"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :lg="11" :md="11" :xs="24" :sm="11">
                        <el-form-item label="邮寄地址:" prop="address">
                            <el-input v-model="projectForm.address" placeholder="请输入邮寄地址"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :lg="11" :xs="24" :md="11" :sm="11">
                        <el-form-item label="收寄人:" prop="shoujianren">
                            <el-input v-model="projectForm.shoujianren" placeholder="请输入收寄人"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :lg="11" :xs="24" :md="11" :sm="11">
                        <el-form-item label="邮编:" prop="youbian">
                            <el-input v-model="projectForm.youbian" placeholder="请输入邮编"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :lg="11" :md="11" :xs="24" :sm="11">
                        <el-form-item label="微  信  号:" prop="weixin">
                            <el-input v-model="projectForm.weixin" placeholder="请输入微  信  号"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :lg="11" :xs="24" :md="11" :sm="11">
                        <el-form-item label="咨询电话2:" prop="phone2">
                            <el-input v-model="projectForm.phone2" placeholder="请输入咨询电话2"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :lg="11" :md="11" :xs="24" :sm="11">
                        <el-form-item label="网址:" prop="site">
                            <el-input v-model="projectForm.site" placeholder="请输入网址"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="24">
                        <el-divider content-position="left">学校报考要求</el-divider>
                    </el-col>
                    <el-col :lg="24" :md="24" :xs="24" :sm="24">
                        <el-form-item label="材料要求:" prop="cailiao">
                            <el-input v-model="projectForm.cailiao" type="textarea" :rows="4"
                                placeholder="请输入材料要求"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :lg="11" :xs="24" :md="11" :sm="11">
                        <el-form-item label="报名费标准:" prop="fee_type">
                            <el-radio-group v-model="projectForm.fee_type">
                                <el-radio label="0">不收报名费</el-radio>
                                <el-radio label="1">收取报名费</el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </el-col>
                    <el-col :lg="11" :md="11" :xs="24" :sm="11">
                        <el-form-item label="报考金额:" prop="fee">
                            <el-input v-model="projectForm.fee" placeholder="请输入报考金额"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :lg="11" :xs="24" :md="11" :sm="11">
                        <el-form-item label="在线缴费:">
                            <el-radio-group v-model="projectForm.online_pay_type" style="width: 100%">
                                <el-radio label="0">未开通</el-radio>
                                <el-radio label="1">开通</el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </el-col>
                    <el-col :lg="11" :md="11" :xs="24" :sm="11">
                        <el-form-item label="床位定金:">
                            <el-input v-model="projectForm.fee2" placeholder="请输入床位定金"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :lg="22" :xs="24" :md="24" :sm="24">
                        <el-form-item prop="teacher">
                            <el-button type="primary">确认提交</el-button>
                            <el-button @click="handleBack">返回</el-button>
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-col>
        </el-row>
    </el-form>
</template>

<script lang='ts' setup>
import { reactive, ref, onBeforeMount, onMounted } from 'vue'
import { useRouter, useRoute } from 'vue-router';
const router = useRouter()
const route = useRoute()
let manageOptions = ref([{ realname: '孔德坤', id: '1' }])
let memberOptions = ref([])
let noticeOptions = ref([])
let projectForm = reactive({
    school_id: '',    //学校id
    edu: '',          //申报学历
    name: '',         //项目名
    phone: '',        //咨询电话
    phone2: '',       //咨询电话2
    weixin: '',       //微信号
    weixin_code: '', //微信二维码地址
    address: '',      //邮寄地址
    cailiao: '',      //材料要求
    fee_type: '0',     //报名费标准：0-不收报名费，1-收报名费
    fee: '',           //报考金额
    online_pay_type: '0', //在线缴费：0-未开通，1-开通
    online_pay_code: '', //缴费二维码
    manager: [], //manager
    shoujianren: '',
    youbian: '', //邮编
    major: [{ name: '暂无' }], //专业录入（数组)
    site: '',
    fee2: '',
    projectMember: [], //项目成员
    notification: [] //微信通知
})
const handleBack = () => {
    router.push({path:'/school-management/index'})
}
</script>
<style scoped>
.el-select {
    width: 100%;
}
</style>    